set cardSupport to " "

if state of button "onAGP" of window main is true and state of button "onPCI" of "main" is true
set cardSupport to "IOAGPDevice, IOPCIDevice"
end if

if state of button "onAGP" of window "main" is true and state of button "onPCI" of window "main" is false
set cardSupport to "IOAGPDevice"
end if

if state of button "onAGP" of window "main" is false and state of button "onPCI" of window "main" is true
set cardSupport to "IOPCIDevice"
end if

if state of button "onAGP" of window "main" is false and state of button "onPCI" of window "main" is false
set cardSupport to " "
end if

set lineOne to "defaults write Configuration '{ GLCompositorConfiguration = { GLCompositorRequiredClasses = ( " & cardSupport & ") ; }; }'"

do shell script lineOne

do shell script "sudo cp -f $home/Library/Preferences/Configuration.plist /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/" with administrator privileges

if (state of button "altivec" of box "runquit" of window "main") is 1 then